<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Requests\UserContext;
use App\Http\Services\GoodsOrderService;
use App\Http\Traits\ResponseJson;

class GoodsOrderController extends Controller
{
    use ResponseJson;

    protected $goodsOrderService;

    public function __construct(GoodsOrderService $goodsOrderService)
    {
        $this->goodsOrderService = $goodsOrderService;
    }

    public function lists(UserContext $userContext)
    {
        $data = $this->goodsOrderService->lists($userContext);
        return $this->returnJson($data);
    }

    public function createGoodsOrder(UserContext $userContext)
    {
        $data = $this->goodsOrderService->createGoodsOrder($userContext);
        return $this->returnJson($data);
    }

    public function orderDetail(UserContext $userContext)
    {
        $data = $this->goodsOrderService->orderDetail($userContext);
        return $this->returnJson($data);
    }

    public function orderGoodStatics(UserContext $userContext)
    {
        $data = $this->goodsOrderService->orderGoodStatics($userContext);
        return $this->returnJson($data);
    }

    public function goodsLists()
    {
        $data = $this->goodsOrderService->goodsLists();
        return $this->returnJson($data);
    }

    public function goodsStatics()
    {
        $data = $this->goodsOrderService->goodsStatics();
        return $this->returnJson($data);
    }

    public function goodsUpdate(UserContext $userContext)
    {
        $data = $this->goodsOrderService->goodsUpdate($userContext);
        return $this->returnJson($data);
    }

    public function shopStatic(UserContext $userContext)
    {
        $data = $this->goodsOrderService->shopStatic($userContext);
        return $this->returnJson($data);
    }

    public function allShopGoods(UserContext $userContext)
    {
        $data = $this->goodsOrderService->allShopGoods($userContext);
        return $this->returnJson($data);
    }

    public function shopOrder()
    {
        $data = $this->goodsOrderService->shopOrder();
        return $this->returnJson($data);
    }

    public function shopOrderStatics()
    {
        $data = $this->goodsOrderService->shopOrderStatics();
        return $this->returnJson($data);
    }

    public function verifyOrder(UserContext $userContext)
    {
        $data = $this->goodsOrderService->verifyOrder($userContext);
        return $this->returnJson($data);
    }
}
